<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>   
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>  
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>       
<c:set var="ctx" value="${pageContext.request.contextPath}"/> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="../include.jsp"/>
<script type="text/javascript">
	
	$(function() {
		parent.$.messager.progress('close');
		$('#form').form({
			url : '${ctx}/user/restSelfPwd',
			onSubmit : function() {
				validate = $(this).form('validate');	
				if(validate){
					return true;
				}else{
					return false;
				}				
			},
			success : function(result) {
				parent.$.messager.progress('close');
				result = $.parseJSON(result);
				if(result.success) {
					parent.$.modalDialog.handler.dialog('close');
					parent.$.messager.alert('系统提示', result.msg, 'info');
				} else {
					parent.$.messager.alert('错误', result.msg, 'error');
				}
			}
		});
	});
		
	
</script>
</head>
<body>
	<div class="easyui-layout" data-options="fit:true,border:false">
		<div data-options="region:'center',border:false" title="" style="overflow: hidden;">			
			<form id="form" method="post">
	            <div style="margin-bottom:5px;padding-top:20px;padding-left:7%">
	                <input labelAlign="right" type="password" id="password" name="password" class="easyui-textbox" value="" style="width:80%" data-options="label:'原密码:',required:true">
	            </div>	            
	            <div style="margin-bottom:5px;padding-left:7%">
	                <input labelAlign="right" type="password" id="newPassword" name="newPassword" class="easyui-textbox" value="" style="width:80%" data-options="label:'新密码:',required:true">
	            </div>
	            <div style="margin-bottom:5px;padding-left:7%">
	                <input labelAlign="right" type="password" id="regPassword" name="regPassword" class="easyui-textbox" value="" style="width:80%" validType="equalTo['#newPassword']" data-options="label:'确认密码:',required:true">
	            </div>
	        </form>
		</div>
	</div>
</body>
</html>